
#pragma once

#include <stdbool.h>
#include <stdio.h>

#include "common/filedbdefs.h"

struct Node;

/*
 *
 * Algorithms
 *
 */

struct Node * new_node(struct Node * parent);

struct Node * add_lexeme(const FileChar * lexeme, const FileChar * lexeme_end, struct Node * node);

void free_node(struct Node * node);


bool save_tree_to_file(struct Node * node, FILE * fdest);
